var webApp = angular.module("webApp",[]);

webApp.controller('webCtrl', ['$scope', '$http', function($scope, $http){

    $scope.elapsed = 0;
    $scope.startDate = new Date();
    $scope.tip = "loading data ...";
    $http.get('http://10.158.166.65:8080/api/2/repositories/').
    //$http.get('http://10.158.166.65:8080/api/2/repository/ShareFile-WebApp-master').
    //$http.get('http://10.158.52.60/').
        success(function(data, status, headers, config) {
            console.log("data loaded");
            $scope.tip = "data loaded";
            $scope.endDate = new Date();
            $scope.elapsed = ($scope.endDate - $scope.startDate)/1000;
        }).
        error(function(data, status, headers, config) {

        });
}]);
